<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPHINXsys/src/shared/sphinxsys_system/sph_system.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3dc1dabd28ba78e072d14d3fcfc90454.html">SPHINXsys</a></li><li class="navelem"><a class="el" href="dir_48ea983704c43b6d88c1fa3f4d09e369.html">src</a></li><li class="navelem"><a class="el" href="dir_0a0d9ef1793521534f0094f317758287.html">shared</a></li><li class="navelem"><a class="el" href="dir_a9c3ba9b250bbba97b908bc7d8bc1bbc.html">sphinxsys_system</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">sph_system.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sph__system_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define TBB_PREVIEW_GLOBAL_CONTROL 1</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;tbb/global_control.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;boost/program_options.hpp&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span>po = boost::program_options;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;base_data_package.h&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sph__data__conainers_8h.html">sph_data_conainers.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifdef __APPLE__</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;boost/filesystem.hpp&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">namespace </span>fs = boost::filesystem;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;experimental/filesystem&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">namespace </span>fs = std::experimental::filesystem;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_s_p_h.html">SPH</a> </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">class </span>SPHBody;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">class </span>In_Output;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html">   42</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_s_p_h_1_1_s_p_h_system.html">SPHSystem</a></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <a class="code" href="class_s_p_h_1_1_s_p_h_system.html">SPHSystem</a>(<a class="code" href="namespace_s_p_h.html#ad185cdeb05bdee76bf975cc50f1c15b7">BoundingBox</a> system_domain_bounds, Real resolution_ref,</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            <span class="keywordtype">size_t</span> number_of_threads = std::thread::hardware_concurrency());</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#a04e180b1f52b8cf07f1f0c0ef0ad184e">   47</a></span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_s_p_h_1_1_s_p_h_system.html">SPHSystem</a>() {};</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="namespace_s_p_h.html#ad185cdeb05bdee76bf975cc50f1c15b7">BoundingBox</a> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#a04e180b1f52b8cf07f1f0c0ef0ad184e">system_domain_bounds_</a>;          </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#afdba04a89c69bd619884e27aeb1a0d85">   50</a></span>&#160;        Real <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#afdba04a89c69bd619884e27aeb1a0d85">resolution_ref_</a>;                       </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#a6e0f4c97f651fb47b6efe70024b0161e">   51</a></span>&#160;        tbb::global_control <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#a6e0f4c97f651fb47b6efe70024b0161e">tbb_global_control_</a>;    </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#af8fa1222296aa6d6a189ed78fa1f11a5">   53</a></span>&#160;        <a class="code" href="class_s_p_h_1_1_in___output.html">In_Output</a>* <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#af8fa1222296aa6d6a189ed78fa1f11a5">in_output_</a>;              </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#aa8857ddbfa363705aed7220755d8bc6b">   54</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#aa8857ddbfa363705aed7220755d8bc6b">restart_step_</a>;               </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#ab7507f0cd0f83c6ccb5986ed23a58e91">   55</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#ab7507f0cd0f83c6ccb5986ed23a58e91">run_particle_relaxation_</a>;      </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#a66b753581ddeda0bf9ee71a8b7c126b2">   56</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#a66b753581ddeda0bf9ee71a8b7c126b2">reload_particles_</a>;             </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#a0d48a961d6eb6dd5b305a83f8740453b">   58</a></span>&#160;        <a class="code" href="class_std_vec_3_01_s_p_h_body_01_5_01_4.html">SPHBodyVector</a> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#a0d48a961d6eb6dd5b305a83f8740453b">bodies_</a>;              </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#ac1c1dcabfcf5aa3b75d086c7f687a9f9">   59</a></span>&#160;        <a class="code" href="class_std_vec_3_01_s_p_h_body_01_5_01_4.html">SPHBodyVector</a> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#ac1c1dcabfcf5aa3b75d086c7f687a9f9">fictitious_bodies_</a>;   </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_s_p_h_system.html#a843281f20669d47a24b25cdbf6b4b848">   60</a></span>&#160;        <a class="code" href="class_std_vec_3_01_s_p_h_body_01_5_01_4.html">SPHBodyVector</a> <a class="code" href="class_s_p_h_1_1_s_p_h_system.html#a843281f20669d47a24b25cdbf6b4b848">real_bodies_</a>;         </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordtype">void</span> addABody(<a class="code" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a>* sph_body);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordtype">void</span> addARealBody(<a class="code" href="class_s_p_h_1_1_real_body.html">RealBody</a>* Real_body);</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordtype">void</span> addAFictitiousBody(<a class="code" href="class_s_p_h_1_1_fictitious_body.html">FictitiousBody</a>* fictitious_body);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordtype">void</span> initializeSystemCellLinkedLists();</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordtype">void</span> initializeSystemConfigurations();</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordtype">void</span> handleCommandlineOptions(<span class="keywordtype">int</span> ac, <span class="keywordtype">char</span>* av[]);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    };</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_a6e0f4c97f651fb47b6efe70024b0161e"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#a6e0f4c97f651fb47b6efe70024b0161e">SPH::SPHSystem::tbb_global_control_</a></div><div class="ttdeci">tbb::global_control tbb_global_control_</div><div class="ttdef"><b>Definition:</b> sph_system.h:51</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_fictitious_body_html"><div class="ttname"><a href="class_s_p_h_1_1_fictitious_body.html">SPH::FictitiousBody</a></div><div class="ttdoc">Derived class from SPHBody. Without inner configuration or inner interaction.</div><div class="ttdef"><b>Definition:</b> base_body.h:143</div></div>
<div class="ttc" id="asph__data__conainers_8h_html"><div class="ttname"><a href="sph__data__conainers_8h.html">sph_data_conainers.h</a></div><div class="ttdoc">Set up of basic data structure.</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_real_body_html"><div class="ttname"><a href="class_s_p_h_1_1_real_body.html">SPH::RealBody</a></div><div class="ttdoc">Derived class from SPHBody. With inner particle configuration or inner interactions.</div><div class="ttdef"><b>Definition:</b> base_body.h:121</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_a0d48a961d6eb6dd5b305a83f8740453b"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#a0d48a961d6eb6dd5b305a83f8740453b">SPH::SPHSystem::bodies_</a></div><div class="ttdeci">SPHBodyVector bodies_</div><div class="ttdef"><b>Definition:</b> sph_system.h:58</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html">SPH::SPHSystem</a></div><div class="ttdoc">The SPH system managing objects in the system level.</div><div class="ttdef"><b>Definition:</b> sph_system.h:42</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_afdba04a89c69bd619884e27aeb1a0d85"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#afdba04a89c69bd619884e27aeb1a0d85">SPH::SPHSystem::resolution_ref_</a></div><div class="ttdeci">Real resolution_ref_</div><div class="ttdef"><b>Definition:</b> sph_system.h:50</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_ac1c1dcabfcf5aa3b75d086c7f687a9f9"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#ac1c1dcabfcf5aa3b75d086c7f687a9f9">SPH::SPHSystem::fictitious_bodies_</a></div><div class="ttdeci">SPHBodyVector fictitious_bodies_</div><div class="ttdef"><b>Definition:</b> sph_system.h:59</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_ab7507f0cd0f83c6ccb5986ed23a58e91"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#ab7507f0cd0f83c6ccb5986ed23a58e91">SPH::SPHSystem::run_particle_relaxation_</a></div><div class="ttdeci">bool run_particle_relaxation_</div><div class="ttdef"><b>Definition:</b> sph_system.h:55</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_af8fa1222296aa6d6a189ed78fa1f11a5"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#af8fa1222296aa6d6a189ed78fa1f11a5">SPH::SPHSystem::in_output_</a></div><div class="ttdeci">In_Output * in_output_</div><div class="ttdef"><b>Definition:</b> sph_system.h:53</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_a843281f20669d47a24b25cdbf6b4b848"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#a843281f20669d47a24b25cdbf6b4b848">SPH::SPHSystem::real_bodies_</a></div><div class="ttdeci">SPHBodyVector real_bodies_</div><div class="ttdef"><b>Definition:</b> sph_system.h:60</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_a66b753581ddeda0bf9ee71a8b7c126b2"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#a66b753581ddeda0bf9ee71a8b7c126b2">SPH::SPHSystem::reload_particles_</a></div><div class="ttdeci">bool reload_particles_</div><div class="ttdef"><b>Definition:</b> sph_system.h:56</div></div>
<div class="ttc" id="anamespace_s_p_h_html_ad185cdeb05bdee76bf975cc50f1c15b7"><div class="ttname"><a href="namespace_s_p_h.html#ad185cdeb05bdee76bf975cc50f1c15b7">SPH::BoundingBox</a></div><div class="ttdeci">std::pair&lt; Vecd, Vecd &gt; BoundingBox</div><div class="ttdef"><b>Definition:</b> sph_data_conainers.h:19</div></div>
<div class="ttc" id="aclass_std_vec_3_01_s_p_h_body_01_5_01_4_html"><div class="ttname"><a href="class_std_vec_3_01_s_p_h_body_01_5_01_4.html">StdVec&lt; SPHBody * &gt;</a></div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_body_html"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_body.html">SPH::SPHBody</a></div><div class="ttdoc">SPHBody is a base body with basic data and functions. Its derived class can be a real fluid body,...</div><div class="ttdef"><b>Definition:</b> base_body.h:63</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_in___output_html"><div class="ttname"><a href="class_s_p_h_1_1_in___output.html">SPH::In_Output</a></div><div class="ttdoc">The base class which defines folders for output, restart and particle reload folders.</div><div class="ttdef"><b>Definition:</b> in_output.h:63</div></div>
<div class="ttc" id="anamespace_s_p_h_html"><div class="ttname"><a href="namespace_s_p_h.html">SPH</a></div><div class="ttdef"><b>Definition:</b> solid_body_supplementary.cpp:9</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_aa8857ddbfa363705aed7220755d8bc6b"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#aa8857ddbfa363705aed7220755d8bc6b">SPH::SPHSystem::restart_step_</a></div><div class="ttdeci">size_t restart_step_</div><div class="ttdef"><b>Definition:</b> sph_system.h:54</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_p_h_system_html_a04e180b1f52b8cf07f1f0c0ef0ad184e"><div class="ttname"><a href="class_s_p_h_1_1_s_p_h_system.html#a04e180b1f52b8cf07f1f0c0ef0ad184e">SPH::SPHSystem::system_domain_bounds_</a></div><div class="ttdeci">BoundingBox system_domain_bounds_</div><div class="ttdef"><b>Definition:</b> sph_system.h:47</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
